package com.ml.mall.api.order;

import com.ml.mall.annotations.OperLog;
import com.ml.mall.api.BaseController;
import com.ml.mall.bean.base.ApiRestResult;
import com.ml.mall.bean.req.BaseBeanReq;
import com.ml.mall.bean.req.order.OrderAddReq;
import com.ml.mall.bean.req.order.OrderEditReq;
import com.ml.mall.bean.req.order.OrderNewReq;
import com.ml.mall.bean.req.order.OrderQueryPageReq;
import com.ml.mall.consts.PermissionConst;
import com.ml.mall.service.addr.SysOrderAddrService;
import com.ml.mall.service.order.SysOrderService;
import com.ml.mall.utils.MailTemplateUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
* <p>
*  前端控制器
* </p>
*
* @author kyyang
* Created 2021-05-24
*/

@Api(tags = "【order】订单地址")
@RestController
@RequestMapping("/addr")
public class SysOrderAddrController extends BaseController{

     @Autowired
     private SysOrderAddrService sysOrderAddrService;

    @RequestMapping(method = RequestMethod.POST, path = "/query_order_addr")
    @ApiOperation("根据订单号查询订单地址")
//    @RequiresPermissions(PermissionConst.ADDR_QUERY_ORDER_ADDR)
    public ApiRestResult sysOrderAddrQuery(@RequestBody OrderAddReq req) {
        return ApiRestResult.ok(sysOrderAddrService.sysOrderAddrQuery(req.getOid()));
    }
}
